<?php
    @session_start();
    include("template/head_ajax.php");
	if($user['account_login']=="user"){
		header('location:list_article.php?action=access_denied');
	}
	include("submit/Articles/test_qte.php");
	
	?>

    <div class="container-fluid">
        <div class="row-fluid">
                
        <?php include("template/menu_left.php") ?>                
	        <div class="span10" id="content">
            <div class="row-fluid">
            <!-- block -->
            <div class="block">
              <div class="navbar navbar-inner block-header">
                <div class="muted pull-left">Liste des Articles à commander</div>
              </div>
              <div class="block-content collapse in">
              	<div id="printablediv">
                <div class="span12">
                	<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
                    <thead>
                      <tr>
				        <th style="text-align:center;">Référence</th>
						    <th style="text-align:center;">Qté en stock</th>
                <th style="text-align:center;">Qté Minimale</th>
						    <th style="text-align:center;">Désignation</th>
                <th></th>
                      </tr>
                    </thead>
                	<tbody>
                	
                        <?php 
                			for ($i=0; $i<sizeof($array); $i++) {
                            echo'                	        
            	<tr class="odd gradeX">
                  <td style="text-align:center;">
                   	<a href="'.getPhotoName($array[$i]).'"  class="fancybox-effects-a" >'.getRefArticle($array[$i]).'</a>
				        </td>
				        <td  style="color:#d0343a;text-align:center;">
                  '.number_format(getTotQt($array[$i]), 0, '', ' ').'
				        </td>
              <td style="text-align:center;">
                  '.number_format(getQtmin($array[$i]), 0, '', ' ').'
              </td>
					    <td>
					    	'.nl2br(getDesignation($array[$i])).'
					    </td>
                        <td>
                            <a class="btn btn-primary" href="view_article.php?page=list_article&id_article='.$array[$i].'"> Détails Article </a>       
                        </td>
                      </tr>';
							}
					  ?>
                    </tbody>
                  </table>
                </div>
                </div>
                <input class="btn btn-primary btn-small" type="button" value="Imprimer" onclick="javascript:printDiv('printablediv')" style="padding: 6px 24px; margin-top: 20px;font-weight: bold;" />

              </div>
            </div>
        <!-- /block -->
          </div>
                </div>
            </div>
            <hr>
        </div>
<?php  include("template/footer.php") ; ?>